/**
 * Created by 都大爽 on 2017/11/28.
 */
export default {
  getAssetsList (params = {}, cb) {
    axios.get('/api/cms/asset', {params: params}).then(response => {
      cb(response.data)
    })
  },
  getAssetsPolicy (){
    return axios.get('/api/oss/oss-assets-policy')
  },
  putAssetFile(name,type){
    return axios.post('/api/cms/asset', {
      'name': name,
      'type': type
    })
  },
  cacheFlush () {
    return axios.get('/api/cache-flush')
  }
}
